package com.demo.index;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.demo.common.BaseController;

/**
 * 本 demo 仅表达最为粗浅的 jfinal 用法，更为有价值的实用的企业级用法
 * 详见 JFinal 俱乐部: http://jfinal.com/club
 * 
 * IndexController
 */
public class IndexController extends BaseController {
	public void index() {
		render("index.html");
	}
	
	public void indexA() {
	    List<Map<String,Object>> list = new ArrayList<Map<String,Object>>();
	    Map<String,Object> map = new HashMap<String, Object>();
	    map.put("name", "面板");
	    map.put("url", "panel");
	    list.add(map);
	    
	    map = new HashMap<String, Object>();
        map.put("name", "Blog");
        map.put("url", "blog/indexA");
        list.add(map);
        
	    setAttr("list", list);
        render("index_a.html");
    }
	
	public void panel() {
        render("panel.html");
    }
	
	public void login() {
        render("login.html");
    }
}



